(function($){
	$(document).ready(function(){
		if($('.shop-filter-select').length > 0) {
			// var url_load = Drupal.settings.basePath + '?q=shop';
			var url_load = Drupal.settings.basePath + '?q=shop';
			$('.shop-filter-view').find('a').click(function(event){
				var dt_parent = $(this).closest('.shop-filter-view');
				dt_parent.find('a').removeClass('active');
				$(this).addClass('active');
				event.preventDefault();
			});

			if($('.shop-filter-display').length > 0) {
				$('.shop-filter-display').click(function(event){
					var dt_parent = $(this).closest('.shop-filter-select');
					var dt_status = dt_parent.find('.shop-filter-status').val();
					var dt_items = dt_parent.find('.shop-filter-items').val();
					var dt_views = dt_parent.find('.shop-filter-view').find('.active').attr('data-view');
					url_load = url_load + '/' + dt_status + '/' + dt_items + '/' + dt_views;
					window.location = url_load;
					event.preventDefault();
				});
			}
		}
	});
})(jQuery);
